<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Document</title>
    <link rel="stylesheet" href="./bootstrap.css">
    <script src="./jq-3.6.0.js"></script>
    <script src="./bootstrap.js"></script>
    <style>
        .main {
            width: 500px;
            margin-top: 50px;
        }
    </style>
</head>

<body>
    <form class="form-inline" style="margin-top: 50px;">
        <div class="form-group">
            <label for="exampleInputName2">书名</label>
            <input type="text" class="form-control" id="exampleInputName2" placeholder="请你输入书名">
        </div>
        <button type="submit" class="btn btn-default">查询</button>
    </form>
    <table class="table table-striped table-bordered table-hover main">
        <thead>
            <tr>
                <th>序号</th>
                <th>书名</th>
                <th>作者</th>
                <th>价格</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>H5</td>
                <td>张三</td>
                <td>8.8</td>
            </tr>
            <tr class="danger">
                <td>2</td>
                <td>CSS</td>
                <td>张三</td>
                <td>8.8</td>
            </tr>
            <tr>
                <td>3</td>
                <td>JS</td>
                <td>张三</td>
                <td>8.8</td>
            </tr>
        </tbody>
    </table>
    <span class="glyphicon glyphicon-object-align-right" aria-hidden="true"></span>
    <ul class="nav nav-tabs tab">
        <li role="presentation" class="active"><a href="#">Home</a></li>
        <li role="presentation"><a href="#">Profile</a></li>
        <li role="presentation"><a href="#">Messages</a></li>
    </ul>
</body>
<script>
    $('.tab').children().on('click', function(e) {
        $(this).addClass('active').siblings().removeClass('active');
    })
</script>

</html>